<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core3" prefix="select" %>
	<form id="input" class="form-horizontal" method="post" action="addUser" >
		<jsp:include page="uploadImg.jsp"/>
		<div class="form-group">
			<label for="userid" class="col-md-2 control-label"><s:text name="user.login.userName"/></label>
			<div class="col-md-10">
				<input type="text" class="form-control required"  id="userName" placeholder="<s:text name="user.login.userName"/>" name="userName" >
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label"><s:text name="user.login.userPassword"/></label>
			<div class="col-sm-10">
				<input type="password" class="form-control required isPwd" id="userPassword" placeholder="<s:text name="user.login.userPassword"/>" name="userPassword">
	         </div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label"><s:text name="user.userManager.nickname"/></label>
			<div class="col-sm-10">
				<input type="text" class="form-control required" id="nickname" placeholder="<s:text name="user.userManager.nickname"/>" name="nickname">
	         </div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label"><s:text name="user.userManager.sex"/></label>
			<div class="col-sm-10">
				<select:select attrName="sex" cssId="sex" enumWord="sex" cssClass="form-control select" language="${language }"/>
	         </div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label"><s:text name="user.userManager.email"/></label>
			<div class="col-sm-10">
				<input type="text" class="form-control required email" id="email" placeholder="<s:text name="user.userManager.email"/>" name="email">
	         </div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label"><s:text name="user.userManager.phone"/></label>
			<div class="col-sm-10">
				<input type="text" class="form-control required isPhone" id="phone" placeholder="<s:text name="user.userManager.phone"/>" name="phone">
	         </div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label"><s:text name="user.userManager.usertype"/></label>
			<div class="col-sm-10">
				<select:select attrName="roleID" enumWord="usertype" cssClass="form-control select"  language="${language }"/>
	         </div>
		</div>
		
		
		<div class="form-group">
	       <div class="col-md-5 col-md-offset-2 control-label">
	         	<button type="button" class="btn btn-warning" onClick="ajaxContent('getAllUsers')"><s:text name="common.return"/></button>
	         	<button type="submit" id="submit" class="btn btn-primary"><s:text name="common.save"/></button>
	       </div>
       </div>
	</form>
	
<script type="text/javascript">	
	$(function(){
		$("#input").validate({
			submitHandler: function(form){  
				$("#submit").attr("type","button");
				ajaxForm('content','input','aaa');
            }
		});
		
		
	});
</script>
